<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3" xmlns:head="http://www.w3.org/1999/html">
<head th:include="public/public_css::public_css ('查看入库质检详细')"/>

<body style="background-color: #f2f2f2;">
<div class="layui-fluid larry-wrapper">
    <div class="layui-card">
        <div class="layui-row layui-col-space30">
            <section class="panel panel-padding layui-card-body">
                <div class="pro">
                    <table id="table" class="table text-nowrap"></table>
                </div>
            </section>
            <input type="hidden" th:value="${ids}" id="lowerId">
        </div>
    </div>
</div>
<div class="layui-fluid larry-wrapper" hidden="hidden" id="addfunction">
    <div class="layui-card">
    <div class="layui-row layui-col-space30">
        <section class="panel panel-padding layui-card-body">
            <div class="pro">
                <table id="table1" class="table text-nowrap"></table>
            </div>
        </section>

    </div>
</div>
</div>
</body>


<div th:include="public/public_js::public_js"></div>
<style type="text/css">
    .moreBtn {
        width: 50px;
        height: 20px;
        text-align: center;
        color: #fff;
        line-height: 20px;
        background-color: #eee;
        position: relative;
        margin: 0 auto;
        cursor: pointer;
    }

    .moreBtn:before {
        content: '';
        display: block;
        width: 35px;
        height: 20px;
        position: absolute;
        transform: skewX(30deg);
        background: #eee;
        border-top-left-radius: 8px;
        left: -20px;
        top: 0;
    }

    .moreBtn:after {
        content: '';
        display: block;
        width: 35px;
        height: 20px;
        position: absolute;
        transform: skewX(-30deg);
        background: #eee;
        border-top-right-radius: 8px;
        top: 0;
        right: -20px;
    }
</style>
<script>

    layui.use(['list', 'layer', 'zzpUtils', 'jquery', 'laydate'], function () {
        window.operateEvent = {
            "click .layui-btn-primary": function (e, value, row, index) {
                /*这里激活状态那个按钮用不到，啥都不需要写，只读*/
            },
            "click #lookQuality": function (e, value, row, index) {//行创建装车单
                lookQuality(row.id);
            }
        }
        var zzpUtils = layui.zzpUtils,
            $ = layui.jquery,
            laydate = layui.laydate;


        var $table = zzpUtils.table({
            elem: '#table',
            isApi: true,
            pagination: true,
            url: '/wmsqualityinspectionlistdetailed/list/'+$("#lowerId").val(),
            columns: [{
                field: 'zjsf',
                title: '质检方式'
            }, {
                field: 'goodsbh',
                title: '货品编号'
            }, {
                field: 'goodsmc',
                title: '货品名称'
            }, {
                field: 'bzmc',
                title: '包装名称'
            }, {
                field: 'dwmc',
                title: '单位名称'
            }, {
                field: 'shsl',
                title: '收货数量'
            }, {
                field: 'yjsl',
                title: '应检数量'
            }, {
                field: 'show_zt',
                title: '质检状态'
            }, {
                field: 'pc',
                title: '批次'
            }, {
                field: 'scrq',
                title: '生产日期'
            }, {
                field: 'caozuo',
                title: '操作',
                events: operateEvent,
                formatter:operateFormatter
            }],
            queryParams: function () {//查询条件
                return zzpUtils.getFormJson($("#searchForm"));
            },
            detailFormatter: function (index, row) {
                return "这里就没有确定过11";
            }
        });
        /*表格右侧按钮*/
        function operateFormatter(value, row, index) {
            return [
                '<a class="layui-btn layui-btn-xs" id="lookQuality">查看</a>'

            ].join('')
        }
        //查询
        $(".inline-search-btn").on('click', function () {
            zzpUtils.refreshTable("#table");
        })


        //查看入库质检详细明细
        function lookQuality(id) {

            layer.open({
                type: 2,
                area: ['70%', '70%'],
                content: "/zxsswms/task/lookKw?ids=" + id
                ,cancel: function(){
                    //右上角关闭回调
                }
            });

        }
    });

</script>
</html>